﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ozone.Models
{
    public class LiquidMain
    {
        public List<LiquidConfig> LiquidConfig { set; get; }

        public LiquidMain()
        {
            LiquidConfig = new List<LiquidConfig>();
        }

    }

    public class LiquidConfig
    {
        public string FID { set; get; }
        public string FName { set; get; }
        public List<LiquidConfigItem> ListConfigItem { set; get; }
        public LiquidConfig()
        {
            ListConfigItem = new List<LiquidConfigItem>();
        }
        public void Sort()
        {
            for (int i = 0; i < ListConfigItem.Count; i++)
            {
                ListConfigItem[i].FNO = i + 1;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public void ResetStatus()
        {
            for (int i = 0; i < ListConfigItem.Count; i++)
            {
                if (ListConfigItem[i].ifFollowup == 0)
                {

                }
            }
        }
    }

    public class LiquidConfigItem
    {
        public int FNO { set; get; }
        /// <summary>
        /// 试管直径
        /// </summary>
        public double tubediameter { get; set; }
        //初始位置
        public double distance { set; get; }
        //液面初始探测位置
        public double liquidlevelstartPos { set; get; }
        //液面最低探测位置
        public double liquidlevelmaxPos { set; get; }
        //探测速度
        public double liquidlevelSpeedDet { set; get; }
        //探测灵敏度
        public double liqDetSens { set; get; }
        //抽吸速度
        public double adpSuckSpeed { set; get; }
        //探测模式
        public int liqModeIndex { set; get; }
        public string liqModeIndexStr
        {
            get
            {
                if (liqModeIndex == 0) return "常规抽吸探测";
                if (liqModeIndex == 1) return "静默探测";
                return "";
            }
        }


        /// <summary>
        /// 是否吸液跟随
        /// </summary>
        public double ifFollowup { set; get; }

        public string ifFollowupStr
        {
            get
            {
                if (ifFollowup == 0) return "是";
                if (ifFollowup == 1) return "否";
                return "是";
            }
        }

        /// <summary>
        /// 吸液跟随速度
        /// </summary>
        public double followupSpeed { set; get; }
        /// <summary>
        /// 吸液跟随距离(mm)
        /// </summary>
        public double followupDistance { set; get; }
        /// <summary>
        /// 吸液跟随最大位移
        /// </summary>
        public double maxDistance { set; get; }

        /// <summary>
        /// 吸液量
        /// </summary>
        public double aspirationVol { set; get; }
        /// <summary>
        /// 吸液速度
        /// </summary>
        public double absorbliquidspeed { set; get; }
        /// <summary>
        /// 是否排液跟随
        /// </summary>
        public double ifFollowupto { set; get; }
        public string ifFollowuptoStr
        {
            get
            {
                if (ifFollowupto == 0) return "是";
                if (ifFollowupto == 1) return "否";
                return "是";
            }
        }
        /// <summary>
        /// 排液跟随速度
        /// </summary>
        public double followupSpeedto { set; get; }
        /// <summary>
        /// 排液跟随距离
        /// </summary>
        public double followupDistanceto { set; get; }

        /// <summary>
        /// 排液量
        /// </summary>
        public double aspirationVolto { set; get; }
        /// <summary>
        /// 排液速度
        /// </summary>
        public double aspirationVoltospeed { set; get; }
        /// <summary>
        /// 回吸量
        /// </summary>
        public double suckbackVol { set; get; }

        /// <summary>
        /// 回吸速度
        /// </summary>
        public double suckMaxSpeed { set; get; }
        /// <summary>
        /// 回吸粘度
        /// </summary>
        public double suckViscosity { get; set; }


    }
}
